package com.kzw.test.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kzw.test.dao.UserDao;
import com.kzw.test.model.User;

@Service
@Transactional
public class UserService3 {

	@Autowired
	private UserDao userDao;
	
	public void save(User user) throws Exception {
		userDao.save(user);
	}
	
	@Transactional(readOnly=true)
	public List<User> findAll() {
		return userDao.findAll();
	}
}
